package cz.spock.exception;

/**
 * Database exception should be used when application has problem with database connection or database functionality
 * 
 * this exception should be logged as severe and presented to client as fatal internal error
 * 
 * @author miso
 *
 */
@SuppressWarnings("serial")
public class DatabaseException extends SpockRuntimeException {

    public DatabaseException(String msg) {
        super(msg);
        log.severe(msg);
    }
    
    public DatabaseException(String msg, int errCode) {
        super(msg, errCode);
        log.severe(msg + " (code:" + errCode + ")");
    }
    
}
